package cn.online.dao;

import java.util.List;

import cn.online.model.Reply;

public class ReplyDao extends GenericDao<Reply,Integer> {
	
	public List<Reply> getReplyByProblemId(Integer id){
		return getHibernateTemplate().find("from Reply as r where r.problem.id=?",new Object[]{id});
	}
	public void deleteReplyByProblemId(Integer id){
		getHibernateTemplate().bulkUpdate("delete Reply as r where r.problem.id=?", new Object[]{id});
	}
}
